1. Field of the Invention
The present invention relates to an image drawing method and an image drawing apparatus which are applicable to animations displayed while and before an actual scenario of a video game is executed. For example, the image drawing method and the image drawing apparatus are suitably utilized for displaying an animation of three-dimensional images of characters and messages in the game scenario. Further, the present invention relates to a recording medium for storing a program to carry out the image drawing process, and also relates to the program itself.
2. Description of the Related Art
In recent years, there has been a rapid advancement of computer graphics techniques such as hidden line removal, hidden surface removal, smooth shading, and texture mapping thanks to the dramatic development of hardware.
Generally, with the computer graphics techniques, images are generated by the following procedure. Firstly, a plurality of three-dimensional objects are generated by three-dimensional modeling (computer aided design). Then, rendering is performed by adding optical properties such as specular reflection, diffuse reflection, refraction, and transparency to the objects with the shading technique, by adding surface patterns to the objects, and by plotting images depending on surroundings such as a window and scenery reflections and ambient light.
Some information processing machines are used for entertaining users. An example of such information processing machines is an entertainment apparatus such as a video game machine. The entertainment apparatus is used in an entertainment system and capable of reproducing game data recorded in a recording medium such as a CD-ROM on the screen of a TV receiver according to data inputted from an input device.
In the entertainment system, the entertainment apparatus and the input device are normally connected to each other by serial interfaces. When a clock signal is sent from the entertainment apparatus to the input device, the input device sends key switch information corresponding to manual input actions of the user in synchronism with the clock signal.
Recently, the input device is equipped with internal vibration generating means for giving vibrations (shocks) to the user in response to a request from an external drive, for example, the entertainment apparatus. That is, while a game is in progress on the entertainment apparatus, the entertainment apparatus generates various vibrations according to data inputted from the user and gives such vibrations to the user.
Under the circumstances, various types of games utilizing the above-described entertainment apparatus (video game machine) such as a role playing game, a shooting game, a driving game, and a fighting game are available on the market.
In the above types of video games, a beautiful vivid animation (movie) for introducing the basic story or the main character of the video game is displayed on the screen. The animation is intended to attract users into the scenario of the video game.
However, in the conventional video games, once the actual game scenario is started, the quality of images tends to be degraded. For example, the main character is beautifully depicted as a well-proportioned character in the introductory animation. However, once the actual game scenario is started, the main character is awkwardly depicted as a cartoon-like character. Therefore, the user tends to be disappointed and lose interest in playing the game.
Because of the difference (gap) in the image quality, the user hardly identifies himself with the main character in a role-playing game or an adventure game. Mostly, the user is dedicated to merely find items, kill monsters, or try to finish the game scenario as soon as possible like a time trial. The user cannot enjoy visiting a lot of places or solving riddles as the main character in the role-playing game or the adventure game as intended by the game creators.
One solution for eliminating the above gap is to display polygon images of objects in real time in both of the animation in the actual game scenario and the introductory animation.
However, in the above method using polygon images, there are some difficulties in processing message data. In the case of displaying an animation of two-dimensional images, message data recorded in a CD-ROM or the like can be directly outputted on the screen. However, in the case of displaying an animation of three-dimensional images, it is necessary to draw polygon images one by one by converting vertex data of object data based on motion data read from a CD-ROM. Therefore, it is necessary to take some measures to associate message data and motion data, and to handle reading errors.
The present invention has been made taking the above circumstances into account, and an object thereof is to provide an image drawing method, an image drawing apparatus, a recording medium, and a program applicable to animations displayed while and before an actual scenario of a video game is executed. According to the present invention, it is possible to display polygons of various objects in real time in both of the animations. Further, according to the present invention, it is possible to display messages clearly regardless of the presence of reading errors.
According to the present invention, an image drawing method comprises the steps of:
reading streaming data made up of a lot of frame data sector by sector;
performing an object drawing process to display an animation of three-dimensional images on a screen based on at least motion data in each of the frame data; and
performing a message drawing process to display messages on the screen based on message data in each of the frame data,
wherein same message data indicative of one message is stored in a plurality of frame data of the streaming data, the message data comprising a plurality of packet data each indicating a message image and a plurality of index data each indicating positional information of a message image; and
wherein, in the message drawing process, message images indicated by a plurality of packet data are drawn at predetermined positions based on a plurality of index data to display a message on the screen.
Further, according to the present invention, an image drawing apparatus comprises:
means for reading streaming data made up of a lot of frame data sector by sector;
means for performing an object drawing process to display an animation of three-dimensional images on a screen based on at least motion data in each of the frame data; and
means for performing a message drawing process to display messages on the screen based on message data in each of the frame data,
wherein same message data indicative of one message is stored in a plurality of frame data of the streaming data, the message data comprising a plurality of packet data each indicating a message image and a plurality of index data each indicating positional information of a message image; and
wherein the means for performing a message drawing process draws message images indicated by a plurality of packet data at predetermined positions based on a plurality of index data to display a message on the screen.
Further, according to the present invention, a recording medium stores a program comprising the steps of:
reading streaming data made up of a lot of frame data sector by sector;
performing an object drawing process to display an animation of three-dimensional images on a screen based on at least motion data in each of the frame data; and
performing a message drawing process to display messages on the screen based on message data in each of the frame data,
wherein same message data indicative of one message is stored in a plurality of frame data of the streaming data, the message data comprising a plurality of packet data each indicating a message image and a plurality of index data each indicating positional information of a message image; and
wherein, in the step of performing a message drawing process, message images indicated by a plurality of packet data are drawn at predetermined positions based on a plurality of index data to display a message on the screen.
Further, according to the present invention, a program comprises the steps of:
reading streaming data made up of a lot of frame data sector by sector;
performing an object drawing process to display an animation of three-dimensional images on a screen based on at least motion data in each of the frame data; and
performing a message drawing process to display messages on the screen based on message data in each of the frame data,
wherein same message data indicative of one message is stored in a plurality of frame data of the streaming data, the message data comprising a plurality of packet data each indicating a message image and a plurality of index data each indicating positional information of a message image; and
wherein, in the step of performing a message drawing process, message images indicated by a plurality of packet data are drawn at predetermined positions based on a plurality of index data to display a message on the screen.
In the object drawing process, streaming data is read sector by sector. Then, image processing for displaying an animation of three-dimensional images on a screen is performed based on at least motion data in each of the frame data.
In the message drawing process, a plurality of valid packet data and a plurality of valid index data are read from a plurality of frame data storing same message data. Then, message images indicated by the plurality of valid packet data are drawn at predetermined positions based on the plurality of valid index data.
Thus, the motion data for displaying an animation of three-dimensional images and the message data for displaying messages can be stored in the streaming data. As a result, it is possible to display polygons of various objects on the screen in real time in both of the animations displayed while and before an actual scenario of a video game is executed. Further, it is possible to display messages on the screen.
Same message data indicative of one message is stored in a plurality of frame data of the streaming data and the message data comprises a plurality of packet data each indicating a message image and a plurality of index data each indicating positional information of a message image. Accordingly, it is possible to reduce packet losses in reading streaming data and reliably display messages on the screen.
Each of packet data is compressed data. In the message drawing process, a plurality of packet data are decompressed to generate message images and the generated message images are drawn at predetermined positions based on a plurality of index data to display a message on the screen. Accordingly, the amount of data for recording message data can be effectively reduced.
A plurality of packet data may be stored successively in a plurality of sectors of one frame data, and each of index data may be stored in a sector header. Accordingly, it is possible to reduce errors in reading packet data or index data.
Preferably, same message data is stored in a plurality of frame data corresponding to the number of frames needed for displaying a message for a predetermined period of time.
In reading the streaming data sector by sector, errors are detected and validity of at least the message data in one frame is determined based on information of the detected errors. Invalid packet data and index data in the message data can be compensated by reading same message data in another frame data. Accordingly, even if there is an error in reading message data in one frame data, it is possible to clearly display the message on the screen.
The above and other objects, features, and advantages of the present invention will become more apparent from the following description when taken in conjunction with the accompanying drawings in which a preferred embodiment of the present invention is shown by way of illustrative example.